import java.lang.reflect.Method;

public class LoadCustomStringTest {

    public static void main(String[] args) throws Exception {

        MyClassLoaderPlus classLoader = new MyClassLoaderPlus();

        Class<?> classes = classLoader.loadClass("CustomObjectA");
        Object obj = classes.newInstance();

        Method method = classes.getDeclaredMethod("test", null);
        Object result = method.invoke(obj);

        System.out.println(classes.getClassLoader());
        System.out.println(classLoader.getParent());

    }

}
